<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        .active {
            border: 1px solid red;
            width: 100px;
            height: 100px;
        }
    </style>
</head>

<body>
<div id="app">
    <div v-bind:class="{active: isActive}"></div>
    <button v-on:click="handle">切换</button>
</div>
<script type="text/javascript" src="js/vue.min.js"></script>
<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
            isActive: true
        },
        methods: {
            handle: function () {
                this.isActive = !this.isActive
            }

        }
    })
</script>
</body>

</html>